﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace BangleCMS.BLL
{
    public class UtilityBLL
    {
        private readonly BangleCMS.DAL.DBUtility dal = new BangleCMS.DAL.DBUtility();

        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(string TableName, string Field, string strWhere, string orderby, int desc, int PageIndex, int PageSize)
        {
            DataSet ds = new DataSet();
            int startIndex = (PageIndex - 1) * PageSize;
            return dal.GetListByPage(TableName, Field, strWhere, orderby, desc, startIndex, PageSize);
        }

        /// <summary>
        /// 获取记录总数
        /// </summary>
        /// <param name="TableName"></param>
        /// <param name="strWhere"></param>
        /// <returns></returns>
        public int GetRecordCount(string TableName, string strWhere)
        {
            return dal.GetRecordCount(TableName, strWhere);
        }
    }
}
